After sampling a signal, I want to scale the sampled data before quantisation
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to sample a signal, then scale the input samples before quantization.
Any idea how I can achieve this?
I was thinking using the ADC block in simulink, but that does not allow me scale the samples before the quantizations.
1 commentaire
Mathieu NOE
le 21 Jan 2022
hello
why not using a simple gain block ? or does the gain factor follow the signal envelop ? then you can use a buffer , pick the max valueand use that to regularly update the gain value
Réponses (1)
Omega
le 10 Oct 2023
Hi Ivan,
I understand that post sampling you would like to scale your signal prior to its quantization.
You can scale your input samples before quantization in Simulink by adding a Gain block before the Quantizer block. Here is a step-by-step guide:
- Add the Gain Block: In your Simulink model, go to the Simulink Library Browser, then navigate to "Simulink" -> "Math Operations" and drag and drop the "Gain" block into your model.
- Configure the Gain Block: Double-click on the Gain block to open its parameters window. In the "Gain" field, enter the scale factor you want to apply to your samples. Click "OK" to close the window.
- Connect the Blocks: Connect your signal source/sampled signal to the input of the Gain block and connect the output of the Gain block to the input of your Quantizer block.
Please note that scaling the samples can change the dynamic range of your signal, so make sure the Quantizer block is set up to handle the scaled values correctly. You may need to adjust the "Quantization interval" parameter of the Quantizer block to match the range of the scaled samples.
To know more you can refer to the following documentation links:
- Gain Block: https://www.mathworks.com/help/simulink/slref/gain.html
- Quanitzer Block: https://www.mathworks.com/help/simulink/slref/quantizer.html
0 commentaires
Voir également
Catégories
En savoir plus sur Quantizers dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!