Embedding a Neural Net
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a NARX model (see attached file for an illustration) to compute the voltage response of an electrical circuit. The output voltage y(t) is a result of both instantaneous and time-delayed effect of applied current x(t). Therefore, the input delay is setup to include the instantaneous value of x(t), along with past values.
I would like to set this up to operate one sample at a time in an infinite loop where the model output (voltage) is compared to the real-time measured voltage:
% Take analog-to-digital measurements of current and voltage
I_meas = current_measurement; % single measurement of current
V_meas = voltage_measurement; % single measurement of voltage
X = con2seq(I_meas); % convert to cell
% Now the neural network computes a single point of modeled voltage
Y_hat = net(X,Xi,Ai);
% Compute the difference between measurement and modeled result
V_hat = cell2mat(Y_hat); % convert back to variable
Model_Error = (V_meas - Y_hat);
repeat loop and take another sample;
How do I setup the net for this usage case?
댓글 수: 2
Greg Heath
2015년 2월 21일
Why in the world would you want to implement this one timestep at a time???
Since there is no such thing as an infinite loop, NEVER try to design a program that has any.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!