MATLAB: Problem with SimScape Controlled Voltage Source

SimscapeSimscape Electricalsimulinksource

Hi, I'm trying to simulate a simple RC divisor with Simulink SimScape.
As stimulation, I use Controlled Voltage Source block, controlled with the Signal Generator block. My problem is with frequencies higher than 10kHz, the amplitude of the signal changes.
This are some examples:
And the results:
Scope 1: The simulink block signal
Scope 2: The SimScape block signal
If any more information it's required please ask me.

Best Answer

Hi Carlos
Check that the maximum step in your solver is small enough to capture the sine wave (10kHz). For example 10us. If the circuit is only resistive, amplitude should be the same regardless of frequency. However, if u have a capacitance, high frequencies are naturally ”filtered”.
Hope this helps / Juan
Related Question