SIMSCAPE SINEWAVE DELAYED IN SCOPE

1 次查看(过去 30 天)
hello
i have been creating a pwm model which converts a continuous time sinewave into a pwm modulated signal. i use two scopes. the first one shows the output of the pwm converter (controlled pwm voltage from simscape library). the second one shows the sinewave. the chain on the second case is:
ac voltage generator (+ port)-->voltage sensor (+ port to the signal and - port to electr. reference)-->ps-to-simulink conv.-->scope.
PARAMETERS: simulation time 0.05s, solver ode23t, min-max step size: 1e-8 and 1e-7, sinewave 2V-1000hz.
where the problem shows is the shown sinewave on the scope. it is a straight line with some angle to the x axis. when i do the same thing with ONLY the ac voltage up to te scope chain in a completely new model file, everything seems perfect!!!
is there any problem with the ac voltage fan out?? the maximum connections that can be done to its port?
thank you for reading and/or suggestions.

采纳的回答

Guy Rouleau
Guy Rouleau 2012-4-26
I think this is just a scope problem
On the scope, click on the "Parameters" button. Go to the History tab and uncheck the "Limit data points to last".
With the 1Mhz PWM, the 1kHz sine wave, and the solver settings, the model takes steps of ~1e-8s. With those time steps, 5000 points is ~5e-5s, which is way smaller that a period of your sine wave.
Since you only see a small period of the sine wave, it looks like, as you say, "a straight line with some angle to the x axis"
  2 个评论
Andreas
Andreas 2012-4-30
I did it and it really works...! THanx for this!
also the scope shows the simulation signals in real time... nice stuff.

请先登录,再进行评论。

更多回答(1 个)

Andreas
Andreas 2012-4-26
Here is the file if someone can help
https://rapidshare.com/files/3453712075/pwm_control_2.mdl

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by