Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Continuous time signal reset and modified at discrete times

Status
Not open for further replies.

gammaxy

Electrical
Mar 31, 2011
1
0
0
US
I am working on a problem where it is convenient to compute a continuous signal based on a mathematical function and play it for a period of time T. Once T has elapsed, I would like to change parameters of the signal and begin again.

An example would be y(t)=c1+c2*(t-kT)+c3*(t-kT)^2. This would resemble a bunch of parabolas or lines concatenated together at every sample period T (the derivative is not necessarily continuous at kT). I would like to be able to set c1, c2, and c3 to different values that are calculated by a separate algorithm at each time step.

In the past I have set it up as a dynamic system and used various techniques to set initial conditions of integrator boxes, etc to get what I want. This works, but is somewhat rube-goldberg and I'd like to see if anyone has a more elegant solution. Does something like this already exist in the toolbox that I am unaware of?

What I'd like is a box where I can set the mathematical function with inputs for c1,c2,c3, etc and a continuous output. Whenever c1,c2,c3 are changed, I'd like the function to start over (there might be a separate trigger or clock input). I do realize I could probably make my own such box, but I'm thinking there must be a more elegant way.
 
Status
Not open for further replies.
Back
Top