Capsim Block Documentation
Model IQ imbalance specifying amplitude mismatch (percent) and phase (degrees).
Port | Type | Name | |
---|---|---|---|
0 | complex | inStream |
Port | Type | Name | |
---|---|---|---|
0 | complex | outStream |
Num | Description | Type | Name | Default Value | |
---|---|---|---|---|---|
0 | Amplitude Mismatch(percent) | float | amplitudeMismatch | 10.0 | |
1 | Phase Mismatch(Deg) | float | phaseMismatch | 2.0 |
Num | Type | Name | Initial Value | Description |
---|---|---|---|---|
0 | float | IA | ||
1 | float | QA | ||
2 | float | iampe | ||
3 | float | qampe | ||
4 | complex | ipe | ||
5 | complex | qpe |
complex tmpIn; complex iqout; complex tmpIP; complex tmpQP; |
---|
iampe = 1-0.5*amplitudeMismatch/100.; qampe = 1+0.5*amplitudeMismatch/100.; ipe.re = cos(-PI*phaseMismatch/360.); ipe.im = sin(-PI*phaseMismatch/360.); qpe.re = cos(PI*phaseMismatch/360.); qpe.im = sin(PI*phaseMismatch/360.); |
---|
while( AVAIL(0) ) { IT_IN(0); tmpIn = INCX(0,0); IA=tmpIn.re*iampe; QA=tmpIn.im*qampe; tmpIP.re=IA*ipe.re; tmpIP.im=IA*ipe.im; tmpQP.im=QA*qpe.re; tmpQP.re=-QA*qpe.im; iqout.re=tmpIP.re+tmpQP.re; iqout.im=tmpIP.im+tmpQP.im; if (IT_OUT(0)){ KrnOverflow("iqimb",0); return(99); } OUTCX(0,0) = iqout; } |
---|
/* * (c) 2007 XCAD Corporation, Portland, Oregon, All Rights Reserved. * Acknowledgement Dr. Yoon */ |
---|