Please enable JavaScript to view this site.

Waijung 2 User Guide

Designing Simulink model for derived RC Circuit Differential Equation

Use Time Constant

The Figure 2 shows the schematic illustrating the wiring connections of RC circuit.

Figure 2: Schematic Representation of the Physical RC Circuit

Figure 2: Schematic Representation of the Physical RC Circuit

Step 1: Get derived Differential Equation (Time domain)

Step 2: Create the Simulink model

Use following blocks:

For Input : Step

To create differential equation : Sum,Gain and Integrator

For Output : Scope

 

Simulink Model: rc_differential_equation.slx

Figure 3: Simulink Model of the Derived RC Circuit Differential Equation(Time domain)

Figure 3: Simulink Model of the Derived RC Circuit Differential Equation(Time domain)

 

Why use 'Integrator' block instead of 'Differentiator' block?

The reason is that the "Differentiator" block in Simulink is used to approximate the derivative of a signal with respect to time, while the RC circuit model requires integration to obtain the voltage across the capacitor.

In the RC circuit model, we have a capacitor voltage equation that involves integration:

To solve this equation in Simulink, we use the "Integrator" block, which performs numerical integration to obtain the capacitor voltage (Vout) from the derivative .

On the other hand, the "Differentiator" block in Simulink approximates the derivative of an input signal. It doesn't perform numerical integration, which is what we need in the RC circuit model.

Step 3: Run Simulation and Open Scope for the results

Figure 4: Simulation Results of the Derived RC Circuit Differential Equation(Time domain) in Simulink

Figure 4: Simulation Results of the Derived RC Circuit Differential Equation(Time domain) in Simulink

In the Simulink simulation of the RC circuit (Figure 4), we observed the expected behavior of the capacitor voltage (Vout) over time. With an initial voltage of zero and a step input applied at one second, the voltage across the capacitor increased exponentially before settling at a final value of 1 volt. This behavior is consistent with the charging response of an RC circuit, where the capacitor gradually charges up to the step input voltage. The time constant (RC) of approximately 0.82 seconds played a crucial role in determining the rate of charge. The Simulink model successfully demonstrated the transient response of the RC circuit, confirming the validity of the derived differential equation representation.

Designing Simulink model for derived RC Circuit Transfer Function

Step 1: Get derived Transfer Function (Frequency domain)

Step 2: Create the Simulink model

Use following blocks:

For Input : Use same Step block from Differential Equation model

To create transfer function : Transfer Fcn

For Output : Use same Scope block from Differential Equation model and add another input port

Use Time Constant

Simulink Model: rc_transfer_function.slx

Figure 5: Simulink Model of the Derived RC Circuit Transfer Function (Frequency Domain)

Figure 5: Simulink Model of the Derived RC Circuit Transfer Function (Frequency Domain)

Step 3: Run Simulation and Open Scope for the results

Figure 6: Simulation Results of the Derived RC Circuit Transfer Function (Frequency Domain) in Simulink

Figure 6: Simulation Results of the Derived RC Circuit Transfer Function (Frequency Domain) in Simulink

Figure 7: Comparative Analysis of Simulation Results between Derived RC Circuit Differential Equation (Time domain) and Derived RC Circuit Transfer Function (Frequency Domain) Using Simulink Model

Figure 7: Comparative Analysis of Simulation Results between Derived RC Circuit Differential Equation (Time domain) and Derived RC Circuit Transfer Function (Frequency Domain) Using Simulink Model

In the Simulink simulation of the RC circuit, the observed behavior of the capacitor voltage (Vout) aligns with the expected charging behavior of an RC circuit. This behavior is characterized by an initial exponential rise in voltage followed by a gradual settling at the final value, which in this case is 1 volt.The differential equation representation of an RC circuit involves solving a first-order linear ordinary differential equation that relates the capacitor voltage to the input voltage and the time constant of the circuit. The transfer function representation, on the other hand, provides a way to analyze the system's behavior in the frequency domain. It's a mathematical representation of the relationship between the Laplace-transformed output and input of a system.

In Figure 6, both the differential equation representation and the transfer function representation of the RC circuit overlap on the same graph. The x-axis represents time, and the y-axis represents voltage. The overlapping behavior demonstrates the consistency between the two representations, as they both describe the same underlying physical system.However, to emphasize that the two representations are indeed identical and to avoid any confusion arising from the overlapping plots, Figure 7 is used. In Figure 7, there are three separate subplots. Subplot 1 shows the Input step signal, subplot 2 shows the differential equation representation, and subplot 3 shows the transfer function representation. Despite the different mathematical formulations, both subplots exhibit identical plots of voltage over time, reinforcing the equivalence of the two representations.

In summary, Simulink simulations of the RC circuit demonstrate the expected charging behavior of the capacitor voltage over time. The differential equation and transfer function representations yield consistent results, with Figure 6 depicting their overlap, and Figure 7 presenting the same behavior in separate subplots to clarify their equivalence.

Copyright 2024 Aimagin Co.,Ltd. Rev.1659