问题
I am new to Matlab and I'm trying to make a simple circuit in Simulink library Simscape. I have an AC voltage source with RMS value 50V and frequency 50Hz. But as shown in the image, the scope displays a noise, not a sine wave as I expected.
What could be the problem? Thanks.
回答1:
No, the scope does display the correct signal, which is a sine wave at 50Hz. 50Hz corresponds to a period of 20ms, so if you want to see the sine wave correctly, you need to zoom in until you have a sufficient resolution, e.g. between 1s and 1.06s would give you 3 periods worth. Right now, you are looking at the whole signal from 0 to 10s, which why it appears like "noise".
If when zooming, you find that your plot does not appear "smooth" enough, you need to adjust your solver settings (you don't say what they are) to take smaller time steps.
来源:https://stackoverflow.com/questions/27252948/simulink-simscape-simple-circuit-not-working