English 中文(简体)
解决多级方程式的多级角
原标题:Solving multiple phase angles for multiple equations

我有几个方面,各自都有自己的频率和振荡。 我要总结一下这些公式,并调整各个阶段、阶段1、阶段2和阶段3,以便把总振幅值保持在0.8等特定价值之下。 我知道,我可以实现信号的正常化或改变垂直的抵消,但为了我的目的,我需要通过改变/调查第一阶段、第二阶段和第三阶段的数值来控制振幅,这些阶段将限制升级幅度最大的。

注:我用建设性和破坏性的阶段干预来调整所总结的公式的最大振幅。

Example:
eq1=0.2*cos(2pi*t*3+phase1)+vertical offset1
eq2=0.7*cos(2pi*t*9+phase2)+vertical offset2
eq3=0.8*cos(2pi*t*5+phase3)+vertical offset3

eq_total=eq1+eq2+eq3

是否有办法解决第1阶段、第2阶段和第3阶段的问题,以便通过仅仅调整/调查第1阶段、第2阶段和第3阶段的数值,使所传唤的信号的深度从0到0.8不等?

在这里,我对地库布拉图进行了测试。

“enter

Here s the geogebra ggb file I used to edit/test idea with. (I used this to see if my idea would work) Java is required if you want to dynamically interact with the applet http://dl.dropbox.com/u/6576402/questions/ggb/sin_find_phases_example.ggb

I m using matlab/octave Thanks

问题回答

你的榜样

eq1=0.2*cos(2pi*t*3+phase1)+vertical offset1
eq2=0.7*cos(2pi*t*9+phase2)+vertical offset2
eq3=0.8*cos(2pi*t*5+phase3)+vertical offset3

eq_total=eq1+eq2+eq3

在最大振幅应小于0.8的地方,解决办法显然很多。 除非你有其他目标,否则我建议你改变这一问题,使你能够把最大幅度的阶段角度(exactly0.8(或0.79)结合起来,从而保证:你将以下部分加以补充。

此外,在三个阶段中,只有两个是独立的;如果你通过<代码>pi/3<>>/代码”来增加,解决办法仍然存在。 因此,在<条码>以下“总中,你只剩下两处不明。

您可使用FMINSEARCH解决非线优化问题。 您提出问题如下:max(abs(eq_ Total(phase1,phase2))

因此:

%# define the vector t, verticalOffset here

%# objectiveFunction is (eq_total-0.79)^2, so the phase shifts 1 and 2 that
%# satisfy this (approximately) should guarantee that signal never exceeds 0.8
objectiveFunction = @(phase)(max(abs(0.2*cos(2*pi*t+phase(1))+0.7*cos(2*pi*t*9+phase(2))+0.8*cos(2*pi*t*5)+verticalOffset)) - 0.79)^2;
%# search for optimal phase shift, starting at no shift
solution = fminsearch(objectiveFunction,[0;0]);

EDIT

不幸的是,当我对这部法典和图谋结果时,最大振幅不是0.79,而是超过1。 我做了一些错误? 见以下代码:t=linspace(0,1,8000);垂直Offset=0;客观功能=@(级)(最大程度(abs(0.2*cos(2*pi*t+阶段(1))+0.7*cos(2*pi**t*9+级(2))+0.8cos(2*p i*t*5)+verticalOffset) -0.79^2; s1 = fminsearch(objectiveFunction,[0;0]) eqt=0.2*cos(2*pi*t+s1(1))+0.7*cos(2*pi*t*9+s1(2))+0.8*cos(2*pi*t*5)+verticalOffs et;地块(以下)

<代码>fminsearch将找到最低限度的客观功能。 这一解决办法是否满足了你的所有条件,这是你必须检验的。 在这种情形下,由<代码>fminsearch提供的解决办法,其起始值为[0;0],该办法的最高限额为~1.3,这显然不够好。 然而,当你确定从0到2皮克不等的一系列阶段的最高点时,你就会看到,“fminsearch don t st住当地最低点。 相反,根本不存在好的解决方案(Z-轴是最大)。

“enterography

If I understand you correctly, you are trying to find a phase to vary the amplitude of a signal. To my knowledge, this is not possible.
For a signal

s = A * cos (w*t + phi)

页: 1 允许你改变itude。 <代码>w, 您改变了信号的频率和phi 规范了“横向转移”。

此外,我认为,在上述公式中,你没有像时间代码那样的“移动变量”。

Maybe ,该条澄清了一点。

If you set all the vertical offsets to be equal to -1, then it solves your problem because each eq# will never be > 0, so the sum can never be >0.8.

I know that this isn t that helpful, but I m hoping that this will help you understand your problem better.





相关问题
MATLAB Solving equations problem

I want to solve these equations using MATLAB and I am sure there is a non zero solution. The equations are: 0.7071*x + 0.7071*z = x -0.5*x + 0.7071*y + 0.5*z = y -0.5*x - 0.7071*y +...

Difference between MATLAB s matrix notations

How do you read the following MATLAB codes? #1 K>> [p,d]=eig(A) // Not sure about the syntax. p = 0.5257 -0.8507 -0.8507 -0.5257 d = ...

preventing data from being freed when vector goes out of scope

Is there a way to transfer ownership of the data contained in a std::vector (pointed to by, say T*data) into another construct, preventing having "data" become a dangling pointer after the vector goes ...

Divide two polynomials using MATLAB

I want to divide p(x) by q(x) given that: p(x)=-5x^4+3x^2-6x q(x)=x^2+1 I tried: p=inline( -5*(x^4)+3*(x^2) , x ) p = Inline function: p(x) = -5*(x^4)+3*(x^2) q=inline( x^2+1 , x ) q = ...

matlab deals with Fibbonacci

The Fibonacci series is given as follows: 1, 2, 3, 5, 8, 13, 21, ... How can I write a script which calculates and prints the n-th Fibonacci term (for n>2), where n is inputed by the user. This ...

How do I plot lines between all points in a vector?

I have a vector containing some points in 2-D space. I want MATLAB to plot these points with lines drawn from every point to every other point. Basically, I want a graph with all vertices connected. ...

How do I create a string using a loop variable in MATLAB?

I have a loop like this: for i=1:no %some calculations fid = fopen( c:\out.txt , wt ); %write something to the file fclose(fid); end I want data to be written to different files like ...

热门标签