Reputation: 21
I need to form a pulse square voltage waveform in a model of Simulink. The model is done with pulse generator and controlled voltage DC source. However, after simulation I get not 100% square voltage waveform. What else should I change to get a 100% square voltage? I attach the pictures and a model that can help to understand.
The output graph:
The circuitry:
The wanted V waveform:
The pulse generator settings:
Upvotes: 2
Views: 2225
Reputation: 196
Is the ramp time dependent on the fixed time step you use in your simulation?
If so - you can approximate the square wave you want by decreasing the step size until it is significantly smaller than the physics you need to simulate - but at a cost of simulation time. (You can also experiment with adaptive step sizes - see the documentation.)
I'm not familiar with the controlled voltage DC sourceyou are using, but the two lower curves look like the type of output Simulink provides if just draws lines between data points and the top line looks like the plot format it uses for stepped data (it draws a line until the next sample point and then a line down to the measure for that sample.
Upvotes: 0