📄 sanjay_run_model1.mdl
字号:
complexity SF_COMPLEX_INHERITED
frame SF_FRAME_NO
}
dataType "inherited"
fixptType {
slope 1
baseType SF_INT16_TYPE
}
complexity SF_COMPLEX_INHERITED
}
instance {
id 15
name "Embedded\nMATLAB Function"
machine 1
chart 9
}
chart {
id 16
name "Embedded\nMATLAB Function2"
windowPosition [255.45 300 200.25 189.75]
viewLimits [0 156.75 0 153.75]
screen [1 1 1024 768 1.333333333333333]
treeNode [0 17 0 0]
firstTransition 19
firstJunction 18
viewObj 16
machine 1
decomposition CLUSTER_CHART
type EML_CHART
firstData 20
chartFileNumber 3
disableImplicitCasting 1
eml {
name "fcn"
}
}
state {
id 17
labelString "eML_blk_kernel()"
position [18 64.5 118 66]
fontSize 12
chart 16
treeNode [16 0 0 0]
superState SUBCHART
subviewer 16
type FUNC_STATE
decomposition CLUSTER_STATE
eml {
isEML 1
script "function fcn(u,fs2)\n% This block supports the Embedded MATLAB subset.\n% See the help menu for details. \n\nfs3=fftshift(fs2);\nplot(u,20*log10(abs(fs3))) % also try \"real\" and \"imag\" parts of \"f\" array\nxlabel('Cross-range y, meters')\nylabel('Magnitude in dB')\ntitle('Cross-range Reconstruction')\naxis('square')\naxis([-200 400 -11 -2]);"
editorLayout "100 M4x1[146 214 671 364]"
}
}
junction {
id 18
position [23.5747 49.5747 7]
chart 16
linkNode [16 0 0]
subviewer 16
type CONNECTIVE_JUNCTION
}
transition {
id 19
labelString "{eML_blk_kernel();}"
labelPosition [32.125 19.875 102.544 14.964]
fontSize 12
src {
intersection [0 0 1 0 23.5747 14.625 0 0]
}
dst {
id 18
intersection [7 0 -1 -1 23.5747 42.5747 0 0]
}
midPoint [23.5747 24.9468]
chart 16
linkNode [16 0 0]
dataLimits [23.575 23.575 14.625 34.575]
subviewer 16
drawStyle SMART
executionOrder 1
}
data {
id 20
name "u"
linkNode [16 0 21]
scope INPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
method SF_INHERITED_TYPE
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
complexity SF_COMPLEX_INHERITED
frame SF_FRAME_INHERITED
}
dataType "inherited"
complexity SF_COMPLEX_INHERITED
}
data {
id 21
name "fs2"
linkNode [16 20 0]
scope INPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
method SF_INHERITED_TYPE
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
complexity SF_COMPLEX_INHERITED
frame SF_FRAME_NO
}
dataType "inherited"
complexity SF_COMPLEX_INHERITED
}
instance {
id 22
name "Embedded\nMATLAB Function2"
machine 1
chart 16
}
chart {
id 23
name "Embedded\nMATLAB Function4"
windowPosition [345.45 210 200.25 189.75]
viewLimits [0 156.75 0 153.75]
screen [1 1 1024 768 1.333333333333333]
treeNode [0 24 0 0]
firstTransition 26
firstJunction 25
viewObj 23
machine 1
decomposition CLUSTER_CHART
type EML_CHART
firstData 27
chartFileNumber 5
disableImplicitCasting 1
eml {
name "cross_range"
}
}
state {
id 24
labelString "eML_blk_kernel()"
position [18 64.5 118 66]
fontSize 12
chart 23
treeNode [23 0 0 0]
superState SUBCHART
subviewer 23
type FUNC_STATE
decomposition CLUSTER_STATE
eml {
isEML 1
script "function [u,fs0,fs1]=cross_range(pi2,c,fc,Xc,L,Y0,Yc,cj)\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n % CROSS-RANGE IMAGING %\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nlambda=c/fc; % Wavelength\nk=pi2/lambda; % Wavenumber\ntheta_c=tan(Yc/Xc); % squint angle to center of target area\nRc=sqrt(Xc^2+Yc^2); % squint range to center of target area\nkus=2*k*sin(theta_c); % Doppler frequency shift in ku domain due to squint\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n% Program performs slow-time compression to save PRF %\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n% Program performs slow-time compression to save PRF %\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%\nXcc=Xc/(cos(theta_c)^2); % redefine Xc by Xcc for squint processing\n%\ndu=(Xcc*lambda)/(4*(Y0+L)); % sample spacing in aperture domain\nduc=(Xcc*lambda)/(4*Y0); % sample spacing in aperture domain\n % for compressed signal\nDY=(10*Xcc*lambda)/(4*L); % Cross-range resolution dependent on L\n%\nL_min=max(Y0,L); % Zero-padded aperture\n%\nmc=2*ceil(L_min/duc);\nuc=duc*(-4674/2:4674/2-1); % synthetic aperture array\ndkuc=pi2/(mc*duc); % sample spacing in ku domain\n%\ndku=dkuc; % sample spacing in ku domain\n%\n% u domain parameters and arrays for Synthetic aperture signal\n%\nm=2*ceil(pi/(du*dku)); % number of samples on aperture\ndu=pi2/(m*dku);\nu=du*(-6428/2:6428/2-1); % synthetic aperture array\nku=dku*(-6428/2:6428/2-1); % ku array\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%%%%% SIMULATION %%%%%%% \n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%\nntarget=2 ; % Number of targets\n%\nyn=[0 0];\nfn=[0 0];\n% Targets' coordinates and reflectivity, set the target positions\ndist=0; reflct=0.2;\nfor i=1:ntarget\n dist=150+dist;\n yn(i)=dist*2;\nend\nfor i=1:ntarget\n reflct=reflct-0.05;\n fn(i)=reflct;\nend \ns=zeros(1,4674); % Measured Echoed Signal (Baseband)\ndis1=sqrt(Xc^2+(Yc+yn(1)-uc).^2);\n s1=s+fn(1)*exp(-cj*2*k*dis1);\n\n dis2=sqrt(Xc^2+(Yc+yn(2)-uc).^2);\n s2=s1+fn(2)*exp(-cj*2*k*dis2);\n \n s3=s2.*exp(-cj*kus*uc); % Slow-time baseband conversion for squint\n %fs=fftshift(fftshift(s3.')).'; \n%plot(uc,20*log10(abs(fs))) \n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%% COMPRESSION-INTERPOLATION-DECOMPRESSION TO UNALIAS %%\n%% APERTURE SIGNAL %%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%\ns4=s3.*exp(cj*kus*uc);\n % Original signal before baseband conversion for squint\ncs=s4.*exp(cj*2*k*sqrt(Xc^2+(Yc-uc).^2)); % compressed signal\ncs1=[cs,cs(4674:-1:1)]; % Append mirror image in slow-time to reduce\n % wrap around errors in interpolation (upsampling)\n% Zero-padding in ku domain\n%\nfcs=fftshift(fft(fftshift(cs1.'),8192)).'; %fty(cs); % F.T. of compressed signal w.r.t. u\n% Zero-padding in ku domain\n%\n%mz=m-mc; % number of zeros is 2*mz\nfcs1=(m/mc)*[zeros(1,1754),fcs,zeros(1,1754)];\ncs2=fftshift(ifft(fftshift(fcs1.'),16384)).';%ifty(fcs);there is a problem that put 11700 instead of 16384\ncs3=cs2(1:6428); % Remove mirror image in slow-time\n%plot(u,20*log10(abs(cs3)))\ns5=cs3.*exp(-cj*2*k*sqrt(Xc^2+(Yc-u).^2)); % decompressed signal\ns6=s5.*exp(-cj*kus*u); % Baseband conversion for squint\n%for i=1:6428\n % fs1(i)=0+0j;\n % end\n\nfs1=fftshift(s6.').'; %fs=fty(s);\n \n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%% RECONSTRUCTION %%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%\n%%% NOTE: ku array corresponds to baseband Doppler domain\n%%% Add kus (squint Doppler shift) for true ku values\n%\nkx=4*(k^2)-(ku+kus).^2;\nkx=sqrt(kx.*(kx > 0)); % kx array\n%\nfs0=(kx > 0).*exp(cj*kx*Xc+cj*(ku+kus)*Yc+cj*.25*pi); % reference signal\n\n "
editorLayout "100 M4x1[146 214 671 364]"
}
}
junction {
id 25
position [23.5747 49.5747 7]
chart 23
linkNode [23 0 0]
subviewer 23
type CONNECTIVE_JUNCTION
}
transition {
id 26
labelString "{eML_blk_kernel();}"
labelPosition [32.125 19.875 102.544 14.964]
fontSize 12
src {
intersection [0 0 1 0 23.5747 14.625 0 0]
}
dst {
id 25
intersection [7 0 -1 -1 23.5747 42.5747 0 0]
}
midPoint [23.5747 24.9468]
chart 23
linkNode [23 0 0]
dataLimits [23.575 23.575 14.625 34.575]
subviewer 23
drawStyle SMART
executionOrder 1
}
data {
id 27
name "pi2"
linkNode [23 0 28]
scope INPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
method SF_INHERITED_TYPE
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
complexity SF_COMPLEX_INHERITED
frame SF_FRAME_NO
}
dataType "inherited"
complexity SF_COMPLEX_INHERITED
}
data {
id 28
name "c"
linkNode [23 27 29]
scope INPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
method SF_INHERITED_TYPE
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
complexity SF_COMPLEX_INHERITED
frame SF_FRAME_NO
}
dataType "inherited"
complexity SF_COMPLEX_INHERITED
}
data {
id 29
name "fc"
linkNode [23 28 30]
scope INPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
method SF_INHERITED_TYPE
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
complexity SF_COMPLEX_INHERITED
frame SF_FRAME_INHERITED
}
dataType "inherited"
complexity SF_COMPLEX_INHERITED
}
data {
id 30
name "Xc"
linkNode [23 29 31]
scope INPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
method SF_INHERITED_TYPE
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
complexity SF_COMPLEX_INHERITED
frame SF_FRAME_INHERITED
}
dataType "inherited"
complexity SF_COMPLEX_INHERITED
}
data {
id 31
name "L"
linkNode [23 30 32]
scope INPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
method SF_INHERITED_TYPE
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
complexity SF_COMPLEX_INHERITED
frame SF_FRAME_INHERITED
}
dataType "inherited"
complexity SF_COMPLEX_INHERITED
}
data {
id 32
name "Y0"
linkNode [23 31 33]
scope INPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
method SF_INHERITED_TYPE
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
complexity SF_COMPLEX_INHERITED
frame SF_FRAME_INHERITED
}
dataType "inherited"
complexity SF_COMPLEX_INHERITED
}
data {
id 33
name "Yc"
linkNode [23 32 34]
scope INPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
method SF_INHERITED_TYPE
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
complexity SF_COMPLEX_INHERITED
frame SF_FRAME_INHERITED
}
dataType "inherited"
complexity SF_COMPLEX_INHERITED
}
data {
id 34
name "cj"
linkNode [23 33 35]
scope INPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
method SF_INHERITED_TYPE
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
complexity SF_COMPLEX_INHERITED
frame SF_FRAME_INHERITED
}
dataType "inherited"
complexity SF_COMPLEX_INHERITED
}
data {
id 35
name "u"
linkNode [23 34 36]
scope OUTPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
method SF_INHERITED_TYPE
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
complexity SF_COMPLEX_INHERITED
frame SF_FRAME_NO
}
dataType "inherited"
complexity SF_COMPLEX_INHERITED
}
data {
id 36
name "fs0"
linkNode [23 35 37]
scope OUTPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
method SF_INHERITED_TYPE
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
complexity SF_COMPLEX_INHERITED
frame SF_FRAME_NO
}
dataType "inherited"
complexity SF_COMPLEX_INHERITED
}
data {
id 37
name "fs1"
linkNode [23 36 0]
scope OUTPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
method SF_INHERITED_TYPE
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
complexity SF_COMPLEX_INHERITED
frame SF_FRAME_NO
}
dataType "inherited"
complexity SF_COMPLEX_INHERITED
}
instance {
id 38
name "Embedded\nMATLAB Function4"
machine 1
chart 23
}
target {
id 39
name "sfun"
description "Default Simulink S-Function Target."
machine 1
linkNode [1 0 0]
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -