Filter löschen
Filter löschen

SIMSCAPE SINEWAVE DELAYED IN SCOPE

1 Ansicht (letzte 30 Tage)
Andreas
Andreas am 23 Apr. 2012
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.

Akzeptierte Antwort

Guy Rouleau
Guy Rouleau am 26 Apr. 2012
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 Kommentare
Andreas
Andreas am 30 Apr. 2012
I am checking now..
Andreas
Andreas am 30 Apr. 2012
I did it and it really works...! THanx for this!
also the scope shows the simulation signals in real time... nice stuff.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

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

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by