In the indoor distributed antenna system, the uplink and downlink of the digital remote unit combine the multi-carrier and output, and the signal power increases after the combination. When the output power is greater than the maximum limit of the system, it may cause damage to the analog devices in the system and output wrong signals. Since the uplink and downlink are respectively oriented to the digital expansion unit and the RF analog unit, power control needs to be performed for different links respectively. Therefore, an FPGA-based uplink and downlink automatic power control technical scheme is proposed. By counting the digital signal power at different times, a short-time automatic power control module suitable for uplink and a short-time automatic power control module suitable for downlink are designed respectively. Long-time automatic power control module, which effectively solves the problem that the signal power exceeds the system threshold after combining, and ensures that the power of the output signal is basically stable. At the same time, the DSP resources are time-division multiplexed according to the multiple relationship between the sampling rate and the clock frequency, which optimizes the consumption of DSP resources. After simulation and actual test on the board, the results show that the control accuracy of the uplink output power is ≤±0.5dB, and the maximum attenuation of 8dB can be achieved. The downlink output power control accuracy is ≤±1dB, the maximum attenuation is 22dB, and the DSP resource consumption is reduced by 50% after time division multiplexing.