Mismatch result in comparison operation in Simulink
Ältere Kommentare anzeigen
Hi,
I am doing comparision operation of two signals as shown fig 1. In one case, sine and triangular signals are compared whose result is shown in fig 2 and in other case sine, triangular signals are phase shifted by 180 deg, performed same operation as shown in fig3. Ideally, both results should be complement to each other , but observing spikes (shown in fig 3). What can be the reason for this ?. How to achieve ideal complementary responses ?.

Fig 1: Simulink circuit of comparision of two signals

Fig 2: Sine, Triangular comparision and its result
Fig 3: Sine, Triangular comparision with 180 deg phase shift and its result.

Simulation solver settings
Akzeptierte Antwort
Weitere Antworten (1)
Sulaymon Eshkabilov
am 29 Dez. 2023
0 Stimmen
The problem is caused by sine wave generator.
Try to tighten the sample time, e.g. 1e-9.
Kategorien
Mehr zu Sources finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!