Switching sinusoidal signals at the same ampltude and in the same half wave
이전 댓글 표시
Hi!
I have the following problem in MATLAB/Simulink and I hope to get some support and/or ideas:
I need to switch at runtime between a sinusoidal signal and a distorted sinusoidal signal. The signals might have a phase shift as well as a slightly different frequency.
The external trigger signal accesses directly the real-time data forcing the signal sources in the simulink model to switch.
However, in order to be allowed to switch, the signals must have the same amplitude and both of them must be either in the positive or negative half wave.
Checking for the same amplitude is quite simple but how can I check the phasing? And if I know the phasing, how can I shift one of the signals so that they are in the same half wave and still have the same amplitude?
I appreciate any response
Kind regards
답변 (1개)
Guy Rouleau
2011년 6월 20일
0 개 추천
Doing exactly what you describe can be pretty complex. If you are constructing the signals in the model using basic blocks, it might be possible to play with the equations to determine when your conditions will happen. Or you can enable (in other words "start") the second signal in specific condition, that way you don't need to check both signals match, you check only the active one. This really depends on how you create these signals.
If the reason you are doing that is to obtain a smooth transition between the 2 signals, I would take another approach. Instead of trying to implement an instantaneous switch at the prefect time, why not doing a progressive switching?
You can multiply the first signal by a signal going smoothly from 1 to 0 and the second one going from 0 to 1 (can be a ramp, or even better a polynomial). I am not sure if this is appropriate for your application, but I used that often.
댓글 수: 2
Rickson
2011년 6월 21일
Guy Rouleau
2011년 6월 21일
I am sorry, but this is outside my knowledge of signal processing.
The link you provide seems to be in the right direction.
I already saw active noise control algorithms being able to identify phase and amplitude of one component of a noisy signal, the using this info to artificially generate a reference for a notch filter. You might want to give a try searching in this direction.
카테고리
도움말 센터 및 File Exchange에서 Chebyshev에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!