The invention discloses a method for radar waveform designing and optimization, wherein the method belongs to the field of radar communication technology. The invention aims to provide the method for waveform designing and optimization, wherein the waveform has characteristics of relatively good thumbtack ambiguity function, low interception probability, relatively high interference resistance, good orthogonality, relatively low peak value power ratio, controllable spectral shape, controllable signal sparsity, controllable signal reconfigurability, etc. According to the method, a related dictionary is optimized according to the requirement for spectrum controllability and low peak mean value power ration in radar waveform design. Furthermore a signal generating system is formed by a signal synthesizing part, an observation matrix part and a sparsity coefficient control part in a closed-loop manner. In signal synthesizing, an output signal is generated according to the dictionary and the sparsity coefficient; a compressed signal is obtained from an output signal through an observation matrix; and the sparsity coefficient required for signal synthesizing at next time is directly obtained from the compression signal through a sparsity coefficient control system. Then in a signal reconstruction system, a reconstructed signal is synthesized from the compressed signal according to the information of the dictionary through the sparisity coefficient control system. The method for radar waveform designing and optimization realizes relatively good application characteristic of the designed radar waveform.