Filtering a signal by setting it zero for a specific amount of time

2 visualizzazioni (ultimi 30 giorni)
Hello,
I'm currently trying to filter the following signal:
I starteted with creating a dead zone from Y(-0.1;0.1). This resulted in the follwing signal:
In a next step I want to check if the signal is unequal to 0. If so, the first 1.5s of the signal should also be set to 0. After 1.5s the original signal should pass through. My problem is that this should only happen in the three red marked regions. I don't know which trigger I should use.
The signal I created and which I'm trying to filter is just an example to test possible solutions. In the real world application exications are random and therefore I cannot define a fixed time at which the signal is switched from the original one to zero. I have to find a trigger that detects all excitations but always stops setting the signal to zero after 1.5s even if the sinosoidal signal is still going.
I cannot increase the dead zone because of the corresponding real world application.
Thanks in advance!

Risposte (1)

Angelo Yeo
Angelo Yeo il 3 Lug 2023
Hi Sven,
I'm not 100% sure what you ultimately want only with the description, but your title made me believe clock and switch blocks should be helpful.
Please check out the attachment too.
Hope this helps.
Angelo
  4 Commenti
Sven Markus
Sven Markus il 3 Lug 2023
Modificato: Sven Markus il 3 Lug 2023
The signal represents the vertical movement of a cylinder in a suspension of heavy duty vehicle. There are frequencies in the range of of 15-20 Hz with a small amplitude that are introduced by the spring characteristics of the wheels. Furthermore there are low frequencies of ~2 Hz that repsresent the eigenfrequncies of a spring-damper system of the chassis while draving over a bump. The filtered signal will be used to actuate a hydropneumatic cylinder via a PID-controller. The cylinders allow vertical adjustment and serve also as a suspension. The higher frequencies are filtered with the dead zone. The low freuquencies, created by the suspension, should be ignored (signal is set to zero) for a certain amount of time (1.5s) so the suspension can do its work. After 1.5s the the the signal is set back to its original state so the PID-controller can adjust the cylinder position. This is required because the vehicle is exposed to load changes and therefore the position of the cylinder must be frequently checked.
Angelo Yeo
Angelo Yeo il 3 Lug 2023
If the signal can be distinguished only with the frequency range, you can use a bandpass filter for 15-20 Hz. Also, you can use triggered subsystem if you need to trigger a part of system to be activated under certiain conditions (e.g., waiting for a certain amount of time like 1.5 s).

Accedi per commentare.

Prodotti


Release

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by