How can I run Matlab's Kalman Filter (DSP Toolbox) in prediction-only mode? - matlab

Documentation and examples on the dsp.KalmanFilter is really scarce. I want to run the Kalman filter in prediction-only mode, where I pass just the control vector as input and no corrections. Can't seem to find a way to do that since the step function takes 2 parameters.

Prediction step is just multiplying the current state by the model matrix.
Why no do it yourself?

Related

Creating a Klauder Wavelet in Matlab to be used in making a synthetic trace

I have some reflectivity data which I am going to convolute with a vibroseis (Klauder) wavelet to get a seismic trace. i am struggling to do the code. I need it to have a sweep from 2500Hz to 7000Hz with a duration of 0.03s (30ms). i have downloaded the CREWES toolbox with the different wavelet functions in but i dont know how to produce it. can anyone help?
Welcome to SO.
You may want to check pp.7 to 10 of this ebook.
There are two ways to do this. You may:
Create your klauder wavelet from scratch. This is the approach detailed here.
Call the klauder function predefined in the CREWES package, as described in the ebook. In this case, you will directly specify the min and max frequencies used for your sweep as arguments in the function: [wk,twk]=klauder(fmin,fmax,dt,slen,tlen,staper);

Are there any softwares that implemented the multiple output gauss process?

I am trying to implement bayesian optimization using gauss process regression, and I want to try the multiple output GP firstly.
There are many softwares that implemented GP, like the fitrgp function in MATLAB and the ooDACE toolbox.
But I didn't find any available softwares that implementd the so called multiple output GP, that is, the Gauss Process Model that predict vector valued functions.
So, Are there any softwares that implemented the multiple output gauss process that I can use directly?
I am not sure my answer will help you as you seem to search matlab libraries.
However, you can do co-kriging in R with gstat. See http://www.css.cornell.edu/faculty/dgr2/teach/R/R_ck.pdf or https://github.com/cran/gstat/blob/master/demo/cokriging.R for more details about usage.
The lack of tools to do cokriging is partly due to the relative difficulty to use it. You need more assumptions than for simple kriging: in particular, modelling the dependence between in of the cokriged outputs via a cross-covariance function (https://stsda.kaust.edu.sa/Documents/2012.AGS.JASA.pdf). The covariance matrix is much bigger and you still need to make sure that it is positive definite, which can become quite hard depending on your covariance functions...

Reproducing a discrete filter block in simulink

I would like to make a discrete filter, where the sampling rate can be controlled by an input. I am trying to understand how the discrete filter block looks, "under its own mask." Is there anyway to retrieve the code behind this block so it can be modified for my use?
You can use an user-defined function as a filter, pick the filter transfer function, translate it into a difference equation (the discrete-time equivalant to the diferrential equation), implement that difference equation in a function and feed the sampling rate as an input (the sampling rate will appear as a constant in your difference equation).
The block is too complex and has too many options to simply be able to look under the mask. Your best option is to have a look at the documentation, which does show some detailed implementation of the block in some articular cases to get an idea and then try to recreate the discrete filter you want from basic building blocks, using a constant sample time at first, until you can validate your own implementation against the Simulink library block. Only then, start considering how you will change the sample time. Your main problem though is that the filter coefficients will change with the sample time, so you need to be able to re-calculate them on the fly. It's not an easy problem, I don't even know if it's possible.

Dense output of SimMechanics?

I have set up a model using SimMechanics. It outputs data at the times where the solver steps to. Is there any possibility to have some kind of dense output such that it is possible to interpolate these data to get the solution at arbitrary points without losing the high order of the integrator?
In Matlab this is easily possible using the function deval after the integration of one of the built-in ODE integrators.
In SimMechanics I can select these integrators, too. Is there some kind of analouge way to deval?
Yes, it's possible, although it's a Simulink functionality, not specific to SimMechanics. In the Configuration Parameters of the model, you can set the model to Produce Specified Output Only (see http://www.mathworks.co.uk/help/simulink/gui/data-import-export-pane.html#bq9_fhw-1), under Data Import/Export. This way, only the outputs you specify will be produced regardless of the time steps taken by the solver.

Matlab 'idpoly' Simulation

I have managed to estimate an 'idpoly' m for my time series Z(1,:) using the 'arx' command in Matlab. Unfortunately I do not know how to use this model m for anything else.
How do I know input a second series Z(2,:) into the model to see how well it predicts on the validation data?
Thanks
Use lsim to simulate your idpoly with an arbitrary time input.
Arnaud