This problem is a solar hut photovoltaic cell in the attached and overhead two installation methods, the type of photovoltaic cells and array mode and inverter type optimization design issues. In question 1, since the photovoltaic cells are attached to the roof and exterior surfaces, the direction and angle of the battery are uniquely determined by the direction and angle of the attached surface. The problem is translated to optimize the installation of a certain type on a single surface area (array) of photovoltaic cells, so that the total amount of solar photovoltaic power generation as much as possible, and the unit power generation costs as small as possible, which is a multi-objective optimization problem. The problem can be discussed in the ideal environment in a single surface area of the battery installation optimization program, and then the actual environment of the multi-surface optimization. In the solution to Problem 1, the unit on the south of the roof of the battery at the moment to accept the solar energy formula is generated. The definition of and is the moment of direct radiation intensity, for the moment the sun and the south of the roof of the plane where the angle, for the level of horizontal radiation intensity, for the south of the roof and the horizontal angle, the planefor the plane, the center of the heart, the vertical upward direction is the axis of the positive coordinate system, obtained with the sun height angle , the sun azimuth , red angle, angle and the sun when the relationship is generated. The conclusion is only installed in the small roof surface type of battery C11, and the rest of the surface is not installed. 35 years of electricity generation is 77126 degrees, the economic benefits of 16,488 yuan, the recovery period of 21.3 years. In question 2, because the photovoltaic cells in the roof and the external wall surface can be installed overhead, the panel orientation and tilt will affect the efficiency of photovoltaic cells. Therefore, in the optimization scheme of Problem 1, the orientation and inclination of the panel on each surface are further adjusted to calculate the optimum orientation and inclination of the panel on each surface. The problem can be in the ideal weather environment to establish the sun running and the battery board efficiency model, and then the measured environment test. The optimal orientation of the panel is southward, and the optimal angle with the ground plane is 39.89 degrees. The conclusion is only installed in the small roof surface type of battery C11, and the rest of the surface is not installed. 35 years of generating capacity of 82165.2 degrees, the economic benefits of 18,998 yuan, the recovery period of 13 years. In question 3, by the optimization of the above two issues, in the building to meet the requirements of the hut under the design of the various aspects of the cabin and battery installation, and further optimize the total power generation of the hut, economic benefits. The whole model solver is run in MATLAB7.0.