Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Fredrik Bagge Carlson
SystemIdentification
Commits
ca562212
Commit
ca562212
authored
Sep 08, 2015
by
Fredrik Bagge Carlson
Browse files
TF -> TFdata
parent
a490a644
Changes
3
Show whitespace changes
Inline
Side-by-side
REQUIRE
View file @
ca562212
SCS
Convex
DSP
src/SystemIdentification.jl
View file @
ca562212
...
...
@@ -4,7 +4,7 @@ export
Model
,
LinearModel
,
NonLinearModel
,
Network
,
Polynom
,
PolynomMatrix
,
TF
,
TF
data
,
AR
,
ARX
,
RBFARX
,
...
...
@@ -18,6 +18,7 @@ toeplitz, kalman
## Fit Methods =================
:
LS
:
LS_reg
:
L1
:
LM
## Types =======================
...
...
@@ -59,7 +60,7 @@ type ARX <: LinearModel
nb
::
Polynom
{
Int
}
end
type
TF
<:
LinearModel
type
TF
data
<:
LinearModel
P
F
end
...
...
src/transfer_functions.jl
View file @
ca562212
using
DSP
function
tfest
(
y
,
u
)
Cyu
=
xcorr
(
y
,
u
)
Cuu
=
xcorr
(
u
,
u
)
Syu
=
welch_pgram
(
Cyu
)
Suu
=
welch_pgram
(
Cuu
)
return
H
=
TF
(
Syu
.
power
./
Suu
.
power
,
Syu
.
freq
)
return
H
=
TFdata
(
Syu
.
power
./
Suu
.
power
,
Syu
.
freq
)
end
tfest
(
iddata
::
IdData
)
=
tfest
(
iddata
.
y
,
iddata
.
u
)
N
=
200000
;
u
=
randn
(
N
);
y
=
filt
(
ones
(
30
),
30
,
u
);
y
=
filt
(
ones
(
5
),
5
,
u
);
H
=
tfest
(
y
,
u
);
log
log
(
H
.
f
,
abs
(
H
.
P
))
semi
log
y
(
H
.
F
,
abs
(
H
.
P
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment