How to compare two ac signals in simulink

조회 수: 3 (최근 30일)
Antarip Giri
Antarip Giri 2017년 2월 16일
답변: Aastha 2025년 6월 13일
I have a controlled ac source voltage and i need to comapre it with the reference source voltage and produce a signal for the if-else subsystem. how do i copare the two signals.

답변 (1개)

Aastha
Aastha 2025년 6월 13일
I understand that you want to compare a controlled AC source voltage with a reference source voltage and generate a signal to be used in an if-else subsystem. You can follow the steps mentioned below to achieve this:
1. Use a "Voltage Sensor" block connected to both the controlled AC source and the reference source to extract their respective voltage signals. The output of the "Voltage Sensor" is a physical signal.
2. To use these signals in Simulink blocks like the "Sum" block, you need to convert them from physical signals to Simulink signals. You can do this using a "PS-Simulink Converter" block connected to each "Voltage Sensor" output.
3. Feed the converted signals into a "Sum" block configured as "+-" to compute the difference between the controlled source voltage and the reference voltage. The output of this block will be zero when both voltages are equal.
4. Connect the output of the "Sum" block to a "Compare To Zero" block.This block will output a high signal when the input is zero, indicating that both voltages are equal. You can use this output as a control signal for the if-else subsystem.
For more information, you can refer to the MathWorks documentation below:
Hope this is helpful!

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by