Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

# Could the comparison of two values in time domain converted into frequency domain?

2 vues (au cours des 30 derniers jours)
FENGPEI YUAN le 8 Mar 2018
Clôturé : MATLAB Answer Bot le 20 Août 2021
My question is based on a mass-spring-damper system. For example in time domain when the output x(t) is greater than 5m, the stiffness k will change into another function. Is it possible that the following case is realized in simulink?
##### 1 commentaireAfficher -1 commentaires plus anciensMasquer -1 commentaires plus anciens
Birdman le 8 Mar 2018

### Réponses (1)

FENGPEI YUAN le 8 Mar 2018
Modifié(e) : Birdman le 9 Mar 2018
This is the basic Simulink model. But there is some problem with the part of 'MATLAB function block', including the input and function. Here is the function:
function y = fcn(u1,u2)
% u1 -- Theta(s)
% u2 -- the reference(comparison) point
refer = u2.*pi;
k_initial = 0.64;
if u1 <= refer
y = k_initial .* u1;
else
y = k_initial.*u1.*exp(-i.*0.2);
end
y = real(y);
As you can see, what I want is to realize the case in the frequency domain that the value of k will be changed into another expression when the output theta(t)> threshold in time domain.
Thanks!
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Cette question est clôturée.

### Community Treasure Hunt

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

Start Hunting!

Translated by