How do I create an Amplitude Modulated Pseudorandom Bit Sequence using the System Identification Toolbox?

조회 수: 37 (최근 30일)
I would like to create a pseudorandom bit sequence (PRBS) that also has an amplitude modulation.
This is used in some systems identification papers, and is referred to as Amplitude Modulated Pseudo-Random Bit Sequences (APRBS).
Does MATLAB have a built-in function to do this?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2017년 11월 20일
Unfortunately, the Systems Identification Toolbox does not have this functionality built in.
However, it is possible to create a signal that has the properties that you want by first creating a PRBS, then finding the indices at which the sequence changes, and finally, assigning the values of the sequence to have random amplitudes between the indices where the changes occur.
The MATLAB code snippet below illustrates this workflow:
u = idinput(101,'prbs',[0 1],[-1 1]);
d = diff(u);
idx = find(u) + 1;
idx = [1;idx];
for ii = 1:length(idx) - 1
amp = randn;
u(idx(ii):idx(ii+1)-1) = amp*u(idx(ii));
end
u = u/max(u);
u = iddata([],u,1);
% Plot the data
figure
plot(u)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Beamforming and Direction of Arrival Estimation에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품


릴리스

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by