summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorSuraj Yerramilli2015-06-03 13:14:26 +0530
committerSuraj Yerramilli2015-06-03 13:14:26 +0530
commit832667ebcd0cfc735a5130300ef0402dd1846423 (patch)
tree20733bac2a05653c49d129fcd9ed344496d378d7 /data
parent6531524c58d578bc73eb4baaf50fe6682d5f5284 (diff)
downloadSysID-R-code-832667ebcd0cfc735a5130300ef0402dd1846423.tar.gz
SysID-R-code-832667ebcd0cfc735a5130300ef0402dd1846423.tar.bz2
SysID-R-code-832667ebcd0cfc735a5130300ef0402dd1846423.zip
Matlab script and data to generate data for spa example
Diffstat (limited to 'data')
-rw-r--r--data/frfdata.m11
-rw-r--r--data/frfdata.matbin0 -> 16430 bytes
2 files changed, 11 insertions, 0 deletions
diff --git a/data/frfdata.m b/data/frfdata.m
new file mode 100644
index 0000000..176edd6
--- /dev/null
+++ b/data/frfdata.m
@@ -0,0 +1,11 @@
+% Generating an IDPOLY object of type ARMAX
+proc_armax = idpoly([1 -1.2 0.35],[0 0 2],[1 0.3],'Noisevariance',1);
+% Simulate the process with a PRBS input
+uk = idinput(2046,'prbs',[0 0.4],[-1 1]); % Full -length PRBS
+yktrue = sim(proc_armax ,uk); % Noise -free simulation
+% Adjusting the noise variance s.t. SNR = 10
+mult_fact = (1 + 0.3^2)*(1 + 0.35)/((1 + 0.35)*(1 - 0.35^2) - 1.2^2 + ...
+0.35*1.2^2);
+proc_armax.Noisevar = 0.1*var(yktrue)/mult_fact;
+% Simulate with noise
+yk = sim(proc_armax ,uk,simOptions('Addnoise',true)); \ No newline at end of file
diff --git a/data/frfdata.mat b/data/frfdata.mat
new file mode 100644
index 0000000..e4d4ac8
--- /dev/null
+++ b/data/frfdata.mat
Binary files differ