There are two real signals in the form of Aisin(wt+pi),i=1,2. Suppose frequency w of both the signals is the same and amplitude Ai and phase pi are different. The first signal has unknown A and p, but they are constant in the time of observation (for simplicity only, actually they aren't). The second signal is under control. We only have it's difference x(t)=s1(t)−s2(t). Some iterative algorithm is needed to minimize power of x(t). So x(t) is available input and A2(t), p2(t) are parameters under control.
The question is: is it some robust and rapid algorithm for jointly control both amplitude and phase to minimize power of x(t)? My idea was to implement complex gradient method: phase and amplitude at each step are represented as a complex number C(t). Signal s2(t) can be set as Re[C(t)exp(iwt)]. But I can't understand how to define cost function and gradient in this case and also this approach seems to be computationally redundant. Any ideas?
Thanks in advance!
Answer
I assume you do everything in discrete time. If I understood correctly then the observed signal is
x(n)=s(n)−Asin(ω0n+ϕ)
where s(n) is a sinusoidal signal with frequency ω0 and unknown amplitude and phase. The parameters A and ϕ are to be optimized such that the power of x(n) is minimized. In a real-time algorithm you can define the cost function as the sum of x2(n) over a fixed length N:
F(A,ϕ,n)=n∑k=n−N+1x2(k)
where n is the current sample. For a steepest descent algorithm you need the gradient:
∂F∂A=−2n∑k=n−N+1x(k)sin(ω0k+ϕ)∂F∂ϕ=−2An∑k=n−N+1x(k)cos(ω0k+ϕ)
The parameters are now updated in the following way:
An=An−1−μ∂Fn−1∂Aϕn=ϕn−1−μ∂Fn−1∂ϕ
where μ is the step size. Note that in every iteration you need to recompute the gradients with the current values of A and ϕ.
The figure below is a simulation of this gradient algorithm with the unknown signal s(n)=2sin(πn/3+π/2), N=50, μ=0.01, and with zero initialization of both amplitude and phase (amplitude A in blue, phase ϕ in green).
No comments:
Post a Comment