I am trying to find a way to algorithmically obtain the amplitude and phase of a function that has sinusoidal terms in the Maxima computer algebra system. This applies only to the steady state (at t β infinity and decay of transients). For example, a trivial case:
f(t) = 1 / w * sin(w * t + theta) + exp(-a * t) + 8
In this case, the gain will be 1 / w, the phase shift will be theta, and we will ignore the transition term exp (-a * t), because we only care about stable gain and phase delay and exp (-a * t) β 0 as t β infinity. We will also ignore the term "+ 8" because it is simply a DC bias. The way I was taught to do this in my engineering classes requires a lot of heuristics and tedious rearrangement of equations to get them in a form similar to the one above, where the answer is obvious just by looking at it.
Does anyone know of a general algorithmic method for finding gain and phase delay, assuming they exist, given that I have a complete computer algebra system (and the standard functions that you would expect from CAS) to throw at that? Although I will most likely implement it in Maxima, I would certainly appreciate the general answers, explained only from the point of view of mathematics.
Edit: I thought it was perfectly clear from my example that I want the answer symbolically, from the point of view of w. w really needs to be omega and represents the input frequency. I really ask if there are any standard mathematical operations that will generate gain and phase without a heap of heuristic manual equation conversion.
source share