I'm using this current sensor TLI4970-D050T4 located at the emitter leg of a power IGBT. This transistor is being switched at 10 kHz. How do I choose the convenient sampling frequency for the sensor? Is it trivial? For example, I'm sampling every 10 ms, so it's obvious I'm going to get a lot of instantaneous measurements which some of them will be zero when the transistor is off.
As far as i know ( from my limited information ) I motor drives the current sampling happens at each switching cycle . ( they call it cycle-by-cycle current limit) , you need to read the current at each PWM cycle.
Usually it is done by making the PWM module trigger a ADC sampling at the beginning of the switching cycle of the IGBT/Mosfet , then the sampling time is ended automatically by the end of the On time for example ( this depends weather you are measuring peak or average current) ,this sample then is converted and compared to the allowed current and then do whatever you want ( for example decrease PWM output or cause a fault signal ... etc )
You must specify , what you need to measure and learn.
I would use 5Mb/s serial port with 80kHz sampling rate with 18kHz BW and measure the current waveform during load change or rms current control change while decimating the rms current into a register , then after the load is characterized for step changes and controlled ramps you can reduce the BW and sampling rate while OCD alerts you for faults. The results can be monitored using some processing for crest factor pk/avg phase shift with voltage and deviation from expected load which you have computed ahead of time then can use as part of a servo controlled output of any kind. e.g. VFD, SMPS, motor kV/RPM etc.
From sampling theory, it is recommended that the sampling rate be at least 2 times the signal frequency. 4 times the signal frequency gives you more accurate results. So, the minimum sampling frequency you need is 20 KHZ, and 40 KHZ if you want better accuracy.